<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "{{%media}}".
 *
 * @property integer $id
 * @property string $name
 * @property string $account
 * @property string $url
 * @property integer $ad_network_id
 * @property string $media_type
 * @property integer $estimate_impression
 * @property integer $estimate_unique_cookie
 * @property integer $archived
 * @property string $last_update
 */
class Media extends \app\models\BaseAR
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%media}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['name', 'account', 'url', 'archived'], 'required'],
            [['ad_network_id', 'estimate_impression', 'estimate_unique_cookie', 'archived'], 'integer'],
            [['last_update'], 'safe'],
            [['name', 'account', 'media_type'], 'string', 'max' => 64],
            [['url'], 'string', 'max' => 255]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => 'Name',
            'account' => 'Account',
            'url' => 'Url',
            'ad_network_id' => 'Ad Network ID',
            'media_type' => 'Media Type',
            'estimate_impression' => 'Estimate Impression',
            'estimate_unique_cookie' => 'Estimate Unique Cookie',
            'archived' => 'Archived',
            'last_update' => 'Last Update',
        ];
    }
}
